package com.java47.controller;

import com.java47.pojo.Flower;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class TestController {
    @RequestMapping("test")
    public String test(Model model){
        List<Flower> list = new ArrayList<>();
        list.add(new Flower(1,"牵牛花1","不知道1","不知道",5.0,"非洲1"));
        list.add(new Flower(2,"牵牛花2","不知道2","不知道",6.0,"非洲2"));
        list.add(new Flower(3,"牵牛花3","不知道3","不知道",7.0,"非洲3"));
        model.addAttribute("list",list);



        return "test1";
    }
}
